/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package SMC.DataAccessLayer;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.swing.JOptionPane;
/**
 *
 * @author SATELLITE
 */
public class ConectarBaseDeDatos {
    private static Connection connect =null;
    private static Connection conectar(){
        try{
           Class.forName("com.mysql.jdbc.Driver");  
            connect = DriverManager.getConnection("jdbc:mysql://localhost/agua_potable", "root", "sextos"); 
             
        }catch(ClassNotFoundException | SQLException e){
            JOptionPane.showMessageDialog(null, e);
        }
        return connect;
    }

    /**
     * @return the connect
     */
    public static Connection getConnect() {
        return conectar();
    }
}

